import type { RouteObject } from "react-router-dom";
import { Navigate } from "react-router-dom";
import Layout from "@/views/Laout/index.tsx";
import Common from "@/router/routers/common";
import NotFind from "@/views/404/index.tsx";
import ErrorBoundary from "@/components/ErrorBoundary/index.tsx";
const mainRouter: RouteObject[] = [
  {
    path: "/",
    element: <Navigate to="/home" />
  },
  {
    path: "/",
    element: <Layout />,
    id: "root",
    errorElement: <ErrorBoundary />,
    children: [...Common]
  },
  {
    path: "*",
    element: <NotFind />
  }
];

export default mainRouter;
